import request from '@/utils/request';

export const fetchShopCarList = () => {
  return request('/carts', {
    method: 'GET',
    params: {
      include: 'goods',
    },
  });
};

export const fetchChecked = (data: any) => {
  return request('/carts/checked', {
    method: 'PATCH',
    data,
  });
};

export const fetchNum = (id: number, num: number) => {
  return request(`/carts/${id}`, {
    method: 'PUT',
    data: {
      num: num,
    },
  });
};
